import request from '@/utils/request'

export const getAllChannels = () => {
  return request({
    method: 'GET',
    url: '/v1_0/channels'
  })
}
/**
 *添加频道
 * @param {Objeact} data
 * @returns
 */
export const addUserChannels = (data) => {
  return request({
    method: 'PATCH',
    url: '/v1_0/user/channels',
    data: {
      channels: [data]
    }
  })
}

export const delUserChannels = (target) => {
  return request({
    method: 'DELETE',
    url: '/v1_0/user/channels/' + target
  })
}
